package cn.stylefeng.guns.modular.system.mapper;

import cn.stylefeng.guns.modular.system.entity.DispatchOrder;
import cn.stylefeng.guns.modular.system.model.params.DispatchOrderParam;
import cn.stylefeng.guns.modular.system.model.result.DispatchOrderResult;
import cn.stylefeng.guns.modular.system.model.result.resultVO.ApplicationDispatchVO;
import cn.stylefeng.guns.modular.system.model.result.resultVO.DispatchOrderVO;
import cn.stylefeng.guns.modular.system.model.result.resultVO.DispatchVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 发货表 Mapper 接口
 * </p>
 *
 * @author ZhangJun
 * @since 2019-07-04
 */
@Repository
public interface DispatchOrderMapper extends BaseMapper<DispatchOrder> {

    /**
     * 获取列表
     *
     * @author ZhangJun
     * @Date 2019-07-04
     */
    List<DispatchOrderResult> customList(@Param("paramCondition") DispatchOrderParam paramCondition);

    /**
     * 获取map列表
     *
     * @author ZhangJun
     * @Date 2019-07-04
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") DispatchOrderParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author ZhangJun
     * @Date 2019-07-04
     */
    Page<DispatchOrderVO> customPageList(@Param("page") Page page, @Param("paramCondition") DispatchOrderParam paramCondition,@Param("dealerId") Long dealerId);

    /**
     * 获取分页map列表
     *
     * @author ZhangJun
     * @Date 2019-07-04
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") DispatchOrderParam paramCondition);
    /**
     * 根据dealer_id查dispatch_order所有

     * @author yl
     * @Date 2019-07-04
     */

    Page<DispatchVO> queryAllByDealerId(@Param("page") Page page, @Param("dealerId") Long dealerId);


    /**
     * 查询小程序申请发货单列表
     * @param page
     * @param userId
     * @return
     */
    Page<ApplicationDispatchVO> selectPurchaseList(@Param("page")Page page,@Param("userId") Long userId,@Param("code") Integer code,@Param("indentOrderNum")String indentOrderNum );


}
